package com.bite.product.api;

import com.bite.product.model.ProductInfo;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

public interface ProductInterface {
    @RequestMapping("/{productId}")
    ProductInfo getProductById(@PathVariable("productId") Integer productId);

    @RequestMapping("/basic")
    String basicType(@RequestParam("id") Integer id, @RequestParam("name") String name);

    @RequestMapping("/object")
    String objectType(@SpringQueryMap ProductInfo productInfo);

    @RequestMapping("/json")
    String jsonType(@RequestBody ProductInfo productInfo);
}
